<?php
/**
 * @copyright meila.com
 * @author shaopu@
 * @name 生成筛选结果列表
 * @param
 *         $class = 分类ID
 *         $tag_ids =
 *         $p = 页码
 * @static
 *         PAGESIZE = 12        //12条数据一分页
 *
 *
 */
include_once '../../__global.php';
include_once(SERVER_ROOT_PATH.'/include/config/ml_actionCode.php');
class aj_save_userAction extends ml_controller{
    private $view;
    private $conview;
    private $arrAlert = array(
        'view' => 'view#conview',
        'usid' => 'usid',
        );
    public function initParam()
    {
        $this->view = $this->input('view','G');
        $this->conview = $this->input('conview','G');
    }
    function checkParam(){
        $this->check_referer();
        if(empty($this->view) && empty($this->conview)){
            $this->api_output(ML_RCODE_PARAM, '', $this->arrAlert['view']);
        }

    }

    public function main()
    {
        $usid = $_COOKIE['usid'];
        $wbinfo = $this->_login->getWeiboInfo();
            $wb_uid = $wbinfo['weiboID'];
        
        if(empty($usid)) {
            $this->api_output(ML_RCODE_PARAM, '', $this->arrAlert['usid']);
        }
        if(!empty($this->view)){
            $view = explode(',', $this->view);
            $view[] = $wb_uid;
            
            Tool_logger::baseActionLog($usid , ML_ACTCODE_LB_VIEWCNT_IN_ALBUM , $view);
        }

        if(!empty($this->conview)) {
            $logcounts = array($usid, $this->conview);
            Tool_logger::baseActionLog($usid , ML_ACTCODE_LB_VIEWCNT_ALBUMS , array($this->conview , $wb_uid));
        }
        $this->api_output(ML_RCODE_SUCC);
    }
}
new aj_save_userAction();
?>